package com.smh.a01butteredInputOrOutputStream;

import java.io.*;

public class BufferedStreamDemo1 {
    public static void main(String[] args) throws IOException {

        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("day27-code\\file\\a.txt"));

        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("day27-code\\file\\b.txt"));

        byte[] bytes = new byte[1024 * 1024];
        int len;

        while ((len = bis.read()) != -1) {
            bos.write((char) len);
        }

//        while ((len=bis.read(bytes))!=-1){
//            bos.write(bytes,0,len);
//        }
        bos.close();
        bis.close();

    }
}
